<% if logged_in? -%>
  <div id="user-bar-action"  >
    <% if current_user.clan.nil? %>
      <%= link_to "Register a clan", new_clan_path   %>
    <% else %>
      <%= link_to "My Clan", clan_path(current_user.clan) %>
    <% end %>
    |
    <%= link_to "Site Admin" %>
  </div>
  <div id="user-bar-greeting">
    Logged in as <%= link_to_current_user :content_method => :login %>
    (<%= link_to "Log out", logout_path, { :title => "Log out" }    %>)
    <span id="crumbs"><%= yield :crumbs %></span>
  </div>
<% else -%>
  <div id="user-bar-action"  ><%= link_to "Log in",  login_path,  { :title => "Log in" } %> /
                               <%= link_to "Sign up", signup_path, { :title => "Create an account" } %></div>
  <div id="user-bar-greeting">
    <%= link_to_login_with_IP 'Not logged in', :style => 'border: none;' %>
    <span id="crumbs"><%= yield :crumbs %></span>
  </div>
<% end -%>
